package com.apache.portal.weixin.entity.send;

import org.jdom.Document;
import org.jdom.Element;

/**
  * description: 回复音乐消息模型
  * @author Hou DaYu 创建时间：下午01:57:47
 */
public class WxSendMusicMsg extends WxSendMsg {

	private String musicUrl;//音乐链接
	private String hqMusicUrl;//高质量音乐链接，WIFI环境优先使用该链接播放音乐
	private String description;//描述
	private String title;//标题

	public WxSendMusicMsg(WxSendMsg msg, String title, String description, String musicUrl, String hqMusicUrl) {
		super(msg);
		setMsgType("music");
		this.title = title;
		this.description = description;
		this.musicUrl = musicUrl;
		this.hqMusicUrl = hqMusicUrl;
	}

	public String getMusicUrl() {
		return musicUrl;
	}

	public void setMusicUrl(String musicUrl) {
		this.musicUrl = musicUrl;
	}

	public String getHqMusicUrl() {
		return hqMusicUrl;
	}

	public void setHqMusicUrl(String hqMusicUrl) {
		this.hqMusicUrl = hqMusicUrl;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Document toDocument() {
		Document doc = super.toDocument();
		Element music = createElement(doc.getRootElement(), "Music", "");
		createElement(music, "Description", getDescription());
		createElement(music, "Title", getTitle());
		createElement(music, "MusicUrl", getMusicUrl());
		createElement(music, "HQMusicUrl", getHqMusicUrl());
		return doc;
	}
}
